<div class="section-container auto" data-section data-options="deep_linking: true">
  <section class="active">
    <p class="title" data-section-title><a href="#grades">Grades</a></p>
    <div class="content" data-slug="grades" data-section-content>
			<table class="table table-bordered">
					<tr class="info">
						<td>Subject Code</td>
						<? if(!empty($grading_periods)) :?>
						<? foreach($grading_periods as $row) :?>
						<td><?= $row->gp_desc ;?></td>
						<? endforeach ;?>
						<? endif ;?>
					</tr>
					<tbody class="tabular">
			  <? if(!empty($student_grades)) :?>
			  <? foreach($student_grades as $row) :?>
						<tr>
							<td><?= $row->subj_code ;?></td>
							<? foreach($grades as $r) :?>
							<? if($r->subject_id == $row->subj_id) :?>
							<td><?=_convert($r->value)?></td>
							<? endif ;?>
							<? endforeach ;?>
						</tr>
					<? endforeach ;?>
			  <? else: ?>
						<tr>
							<th colspan=10 align=center>No Grades Found. or you are not allowed to view Grades.</th>
						</tr>
			  <? endif;?>
			  </tbody>
			</table>
    </div>
  </section>
  <section>
    <p class="title" data-section-title><a href="#remarks">Remarks</a></p>
    <div class="content" data-slug="remarks" data-section-content>
    	
      <?if($grades_found):?>
	      <?if($student_remarks):?>
	      	<table class="table table-bordered table-stripped">
	      		<tr class="info">
						<? if(!empty($grading_periods)) :?>
							<? foreach($grading_periods as $row) :?>
								<td><strong><?= ucwords(strtolower($row->gp_desc.' Remarks')) ;?></strong></td>
							<? endforeach ;?>
						<? endif ;?>
					</tr>
					<?if($student_remarks):?>
						<tr>
						<?foreach($student_remarks as $k => $b ):?>
								<td><?=$b->remarks;?></td>
						<?endforeach;?>
						</tr>
					<?else:?>
	      		<tr>
						<td colspan="4">No Remarks Found. or you are not allowed to view remarks.</td>
					</tr>
	      		<?endif;?>
	      	</table>

	      <?else:?>
	      	<div class="alert-box">No remarks found.</div>
	      <?endif;?>
      <?endif;?>
    </div>
  </section>
    <section>
    <p class="title" data-section-title><a href="#attendance">Attendance</a></p>
    <div class="content" data-slug="attendance" data-section-content>
    	<code>attendance();</code>
    </div>
  </section>
</div>